package com.bjsxt.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bjsxt.domain.TurnoverOrder;
import com.bjsxt.model.R;
import com.bjsxt.service.TurnoverOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/turnoverOrder")
public class TurnoverOrderController {

    @Autowired
    private TurnoverOrderService turnoverOrderService;



    @GetMapping
    public R<Page<TurnoverOrder>> findBypage(Page<TurnoverOrder> page,String symbol,Integer type){
        Long userId = Long.valueOf(SecurityContextHolder.getContext().getAuthentication().getPrincipal().toString());

       Page<TurnoverOrder>page1 = turnoverOrderService.findByPage(page,userId,symbol,type);
        return R.ok(page1);
    }

}
